﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KYO.DAL;
using BusinessLayerHelper;
using ObjectPersistence;

public partial class Control_Mod_Category_CategoryList :  ListControlBase<Category>
{


    CategoryAssembler service = new CategoryAssembler();


    public override PersistentList<Category> GetListObjects
       {
           get
           {
                    return  service.ReadCollectionAll();
               
        
           }
       }

       protected void Page_Load(object sender, EventArgs e)
       {

           if (!IsPostBack)
           {
               ToolbarBox1.Header = "Category Manager";
               List<UrlItem> urls = new List<UrlItem>();
               UrlItem url = new UrlItem();
               url.Text = "Create New";
               url.Url = DoAction.ActionPageView(PageView.Category, Action.CREATE);
               urls.Add(url);
            
               ToolbarBox1.Options = urls;

               LoadData();

           }
       }

    
}
